package com.tan.dao;

import com.tan.pojo.Teacher;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface TeacherMapper {
    //注解查询
    @Select("select * from teacher where id=#{tid}")
    Teacher getTeacherById(@Param("tid") int id);
//    按查询结果，映射结果集
    Teacher getTeacherStudents1(@Param("tid")int id);
//    按子查询，映射结果集
    Teacher getTeacherStudents2(@Param("id") int id);
}
